import App from '../App'
import Vue from 'vue'
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
	return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)

const home = r => require.ensure([], () => r(require('../page/home/home')), 'home')
const checking = r => require.ensure([], () => r(require('../page/checking/checking')), 'checking')
const alter = r => require.ensure([], () => r(require('../page/alter/alter')), 'alter')
const changePassword = r => require.ensure([], () => r(require('../page/changePassword/changePassword')), 'changePassword')
const changeOa = r => require.ensure([], () => r(require('../page/changeOa/changeOa')), 'changeOa')
const leave = r => require.ensure([], () => r(require('../page/leave/leave')), 'leave')
const salary = r => require.ensure([], () => r(require('../page/salary/salary')), 'salary')
const performance = r => require.ensure([], () => r(require('../page/performance/performance')), 'performance')
const evection = r => require.ensure([], () => r(require('../page/evection/evection')), 'evection')
const overtime = r => require.ensure([], () => r(require('../page/overtime/overtime')), 'overtime')
const rest = r => require.ensure([], () => r(require('../page/rest/rest')), 'rest')
const contacts = r => require.ensure([], () => r(require('../page/contacts/contacts')), 'contacts')
const shift = r => require.ensure([], () => r(require('../page/shift/shift')), 'shift')
const goOut = r => require.ensure([], () => r(require('../page/goOut/goOut')), 'goOut')
const forgetClock = r => require.ensure([], () => r(require('../page/forgetClock/forgetClock')), 'forgetClock')

const myInfo = r => require.ensure([], () => r(require('../page/myInfo/myInfo')), 'myInfo')
/*荣誉详情*/
const honorLists = r => require.ensure([], () => r(require('../page/honorLists/honorLists')), 'honorLists')
const handlMatter = r => require.ensure([], () => r(require('../page/handlMatter/handlMatter')), 'handlMatter')
const applyDetail = r => require.ensure([], () => r(require('../page/handlMatter/applyDetail/applyDetail')), 'applyDetail')
const selectPerson = r => require.ensure([], () => r(require('../page/handlMatter/selectPerson/selectPerson')), 'selectPerson')
/*经理自助*/
const generalSelfManage = r => require.ensure([], () => r(require('../page/generalSelfManage/generalSelfManage')), 'generalSelfManage')
const selfManage = r => require.ensure([], () => r(require('../page/selfManage/selfManage')), 'selfManage')
const selfManageList = r => require.ensure([], () => r(require('../page/selfManageList/selfManageList')), 'selfManageList')
const selfManageDetail = r => require.ensure([], () => r(require('../page/selfManageDetail/selfManageDetail')), 'selfManageDetail')
/*图表穿透列表*/
const penetList = r => require.ensure([], () => r(require('../page/penetList/penetList')), 'penetList')
const backlog = r => require.ensure([], () => r(require('../page/backlog/backlog')), 'backlog')
const applyPending = r => require.ensure([], () => r(require('../page/backlog/applyPending/applyPending')), 'applyPending')
const salaryRelation = r => require.ensure([], () => r(require('../page/backlog/salaryRelation/salaryRelation')), 'salaryRelation')
const contractRemove = r => require.ensure([], () => r(require('../page/backlog/contractRemove/contractRemove')), 'contractRemove')
const contractSign = r => require.ensure([], () => r(require('../page/backlog/contractSign/contractSign')), 'contractSign')
const contractRenew = r => require.ensure([], () => r(require('../page/backlog/contractRenew/contractRenew')), 'contractRenew')
const quitJob = r => require.ensure([], () => r(require('../page/backlog/quitJob/quitJob')), 'quitJob')
const perFeedback = r => require.ensure([], () => r(require('../page/backlog/perFeedback/perFeedback')), 'perFeedback')
const deptFeedback = r => require.ensure([], () => r(require('../page/backlog/deptFeedback/deptFeedback')), 'deptFeedback')
const dutyFeedback = r => require.ensure([], () => r(require('../page/backlog/dutyFeedback/dutyFeedback')), 'dutyFeedback')
const filesTransfer = r => require.ensure([], () => r(require('../page/backlog/filesTransfer/filesTransfer')), 'filesTransfer')
const Reemployment = r => require.ensure([], () => r(require('../page/backlog/Reemployment/Reemployment')), 'Reemployment')
const salaryRenewal = r => require.ensure([], () => r(require('../page/backlog/salaryRenewal/salaryRenewal')), 'salaryRenewal')


const annuityIncrease = r => require.ensure([], () => r(require('../page/backlog/annuityIncrease/annuityIncrease')), 'annuityIncrease')
/*中铁建待办*/
/*辞退待办*/
const dismiss = r => require.ensure([], () => r(require('../page/backlog/dismiss/dismiss')), 'dismiss')
/*入职待办*/
const personEntry = r => require.ensure([], () => r(require('../page/backlog/personEntry/personEntry')), 'personEntry')
/*人员需求待办*/
const personRequirement = r => require.ensure([], () => r(require('../page/backlog/personRequirement/personRequirement')), 'personRequirement')
/*人员调动待办*/
const personTransfer = r => require.ensure([], () => r(require('../page/backlog/personTransfer/personTransfer')), 'personTransfer')
/*人员离职待办*/
const personQuit = r => require.ensure([], () => r(require('../page/backlog/personQuit/personQuit')), 'personQuit')
/*出国境申请待办*/
const goAbroad = r => require.ensure([], () => r(require('../page/backlog/goAbroad/goAbroad')), 'goAbroad')
/*转正待办*/
const regularWorker = r => require.ensure([], () => r(require('../page/backlog/regularWorker/regularWorker')), 'regularWorker')
/*预览excel*/
const excelView = r => require.ensure([], () => r(require('../page/excelView/excelView')), 'excelView')

/*绩效考评打分*/
const evaluateAssess = r => require.ensure([], () => r(require('../page/evaluateAssess/evaluateAssess')), 'evaluateAssess')
const selectScheme = r => require.ensure([], () => r(require('../page/evaluateAssess/selectScheme/selectScheme')), 'selectScheme')
const evaluateGrade = r => require.ensure([], () => r(require('../page/evaluateAssess/evaluateGrade/evaluateGrade')), 'evaluateGrade')
const evaluteHistory = r => require.ensure([], () => r(require('../page/evaluateAssess/evaluteHistory/evaluteHistory')), 'evaluteHistory')
/*胜任力考评打分*/
const competencyAssess = r => require.ensure([], () => r(require('../page/competencyAssess/competencyAssess')), 'competencyAssess')
const competencyScheme = r => require.ensure([], () => r(require('../page/competencyAssess/selectScheme/selectScheme')), 'competencyScheme')
const competencyGrade = r => require.ensure([], () => r(require('../page/competencyAssess/evaluateGrade/evaluateGrade')), 'competencyGrade')
const competencyHistory = r => require.ensure([], () => r(require('../page/competencyAssess/competencyHistory/competencyHistory')), 'competencyHistory')












const process = r => require.ensure([], () => r(require('../page/process/process')), 'process')
//我的荣誉
const myHoner = r => require.ensure([], () => r(require('../page/myHoner/myHoner')), 'myHoner')
const message = r => require.ensure([], () => r(require('../page/message/message')), 'message')
const remind = r => require.ensure([], () => r(require('../page/remind/remind')), 'remind')
const targetManage = r => require.ensure([], () => r(require('../page//targetManage/targetManage')), 'targetManage')
const remindDetail = r => require.ensure([], () => r(require('../page/remind/remindDetail/remindDetail')), 'remindDetail')
const backlogList = r => require.ensure([], () => r(require('../page/backlogList/backlogList')), 'backlogList')
const evectionApply = r => require.ensure([], () => r(require('../page/backlogList/children/evection/evection')), 'evection')
const overtimeApply = r => require.ensure([], () => r(require('../page/backlogList/children/overtime/overtime')), 'overtime')
const leaveApply = r => require.ensure([], () => r(require('../page/backlogList/children/leave/leave')), 'leave')
const shiftApply = r => require.ensure([], () => r(require('../page/backlogList/children/shift/shift')), 'shift')
const restApply = r => require.ensure([], () => r(require('../page/backlogList/children/rest/rest')), 'rest')
const goOutApply = r => require.ensure([], () => r(require('../page/backlogList/children/goOut/goOut')), 'goOut')
const forgetClockApply = r => require.ensure([], () => r(require('../page/backlogList/children/forgetClock/forgetClock')), 'forgetClock')
const positionRankApply = r => require.ensure([], () => r(require('../page/backlogList/children/positionRank/positionRank')), 'positionRank')
const toLoanApply = r => require.ensure([], () => r(require('../page/backlogList/children/toLoan/toLoan')), 'toLoan')
const transferApply = r => require.ensure([], () => r(require('../page/backlogList/children/transfer/transfer')), 'transfer')
const holdPostApply = r => require.ensure([], () => r(require('../page/backlogList/children/holdPost/holdPost')), 'holdPost')
const leaveJobApply = r => require.ensure([], () => r(require('../page/backlogList/children/leaveJob/leaveJob')), 'leaveJob')
const regularWorkerApply = r => require.ensure([], () => r(require('../page/backlogList/children/regularWorker/regularWorker')), 'regularWorker')
const generalFormApply = r => require.ensure([], () => r(require('../page/backlogList/children/generalForm/generalForm')), 'generalForm')
const otBatchesApply = r => require.ensure([], () => r(require('../page/backlogList/children/otBatches/otBatches')), 'otBatches')
const reContractApply = r => require.ensure([], () => r(require('../page/backlogList/children/reContract/reContract')), 'reContract')
const postEstablishApply = r => require.ensure([], () => r(require('../page/backlogList/children/postEstablish/postEstablish')), 'postEstablish')
const orgAdjustApply = r => require.ensure([], () => r(require('../page/backlogList/children/orgAdjust/orgAdjust')), 'orgAdjust')
const inductionApply = r => require.ensure([], () => r(require('../page/backlogList/children/induction/induction')), 'induction')
/*我的流程*/
const processList = r => require.ensure([], () => r(require('../page/processList/processList')), 'processList')
const evectionFlow = r => require.ensure([], () => r(require('../page/processList/children/evection/evection')), 'evection')
const overtimeFlow = r => require.ensure([], () => r(require('../page/processList/children/overtime/overtime')), 'overtime')
const leaveFlow = r => require.ensure([], () => r(require('../page/processList/children/leave/leave')), 'leave')
const shiftFlow = r => require.ensure([], () => r(require('../page/processList/children/shift/shift')), 'shift')
const restFlow = r => require.ensure([], () => r(require('../page/processList/children/rest/rest')), 'rest')
const goOutFlow = r => require.ensure([], () => r(require('../page/processList/children/goOut/goOut')), 'goOut')
const forgetClockFlow = r => require.ensure([], () => r(require('../page/processList/children/forgetClock/forgetClock')), 'forgetClock')
const login = r => require.ensure([], () => r(require('../page/login/login')), 'login')
export default [{
    path: '/',
    component: App, //顶层路由，对应index.html
    children: [ //二级路由。对应App.vue
        //地址为空时跳转home页面
				 {
						path: '/',
						name: '登录',
						redirect: '/login',
					},
					{
						path: '/login',
						name: 'login',
						component: login,
					},
        //首页城市列表页
        {
            path: '/home',
            name:'home',
            component: home,
        },
        {
            path: '/checking',
            component: checking
        },

        {
          path: '/changePassword',
          component: changePassword
        },
      {
        path: '/changeOa',
        component: changeOa
      },
        {
            path: '/leave',
            component: leave
        },
        {
            path: '/salary',
            component: salary
        },
        {
            path: '/evection',
            component: evection
        },
        {
            path: '/shift',
            component: shift
        },
        {
            path: '/overtime',
            component: overtime
        },
        {
            path: '/rest',
            component: rest
        },
        {
            path: '/contacts',
            component: contacts
        },
        {
            path: '/performance',
            component: performance
        },
        {
            path: '/alter',
            component: alter
        },
        {
            path: '/goOut',
            component: goOut
        },
        {
            path: '/forgetClock',
            component: forgetClock
        },
        {
            path: '/myInfo',
            component: myInfo
        },
	    {
		    path: '/targetManage',
		    component: targetManage
	    },
      {
        path: '/honorLists',
        component: honorLists,
        name:'honorLists'
      },
      {
        path: '/handlMatter',
        component: handlMatter,
        name:'handlMatter'
      },
      {
        path: '/applyDetail',
        component: applyDetail,
        name:'applyDetail'
      },
	    {
		    path: '/selectPerson',
		    component: selectPerson,
		    name:'selectPerson'
	    },
      {
        path: '/generalSelfManage',
        component: generalSelfManage,
        name:'generalSelfManage'
      },
			
//       {
//         path: '/selfManage',
//         component: selfManage,
//         name:'selfManage'
//       },
			{
				path: '/selfManageList',
				component: selfManageList,
				name:'selfManageList'
			},
			{
				path: '/selfManageDetail',
				component: selfManageDetail,
				name:'selfManageDetail'
			},
      {
        path: '/penetList',
        component: penetList,
        name:'penetList'
      },
        {
            path: '/backlog',
            component: backlog,
            name: backlog,
          // meta: {
          //   keepAlive: true,  // 需要被缓存
          //   isBack: false     //isback是true的时候请求数据，或者第一次进入的时候请求数据
          // }
        },
        {
          path: '/process',
          component: process
        },
	    {
		    path: '/myHoner',
		    component: myHoner
	    },
        {
          path: '/message',
            component: message
        },
	    {
		    path: '/remind',
		    component: remind
	    },
	    {
		    path: '/remindDetail',
		    name:'remindDetail',
		    component: remindDetail
	    },
      /*9个事项办理待办*/
      /*辞退*/
        {
            path: '/dismiss',
            component: dismiss,
            name:'dismiss'
        },
      /*入职*/
        {
            path: '/personEntry',
            component: personEntry,
            name:'personEntry'
        },
        /*人员需求*/
        {
            path: '/personRequirement',
            component: personRequirement,
            name:'personRequirement'
        },
        /*人员调动*/
        {
            path: '/personTransfer',
            component: personTransfer,
            name:'personTransfer'
        },
        /*人员离职*/
        {
            path: '/personQuit',
            component: personQuit,
            name:'personQuit'
        },
        /*转正待办*/
        {
            path: '/regularWorker',
            component: regularWorker,
            name:'regularWorker'
        },
        /*excel预览*/
        {
            path: '/excelView',
            component: excelView,
            name:'excelView'
        },
      {
        path: '/applyPending',
        component: applyPending,
        name:'applyPending'
      },
      /*薪资关系*/
      {
        path: '/salaryRelation',
        component: salaryRelation,
        name:'salaryRelation'
      },
      /*合同解除*/
      {
        path: '/contractRemove',
        component: contractRemove,
        name:'contractRemove'
      },
      /*合同签订*/
      {
        path: '/contractSign',
        component: contractSign,
        name:'contractSign'
      },
      /*合同续签*/
      {
        path: '/contractRenew',
        component: contractRenew,
        name:'contractRenew'
      },
      /*目标管理个人反馈*/
      {
        path: '/perFeedback',
        component: perFeedback,
        name:'perFeedback'
      },
      /*目标管理部门任务反馈*/
      {
        path: '/deptFeedback',
        component: deptFeedback,
        name:'deptFeedback'
      },
      /*目标管理责任领导反馈*/
      {
        path: '/dutyFeedback',
        component: dutyFeedback,
        name:'dutyFeedback'
      },
      /*档案转入*/
      {
        path: '/filesTransfer',
        component: filesTransfer,
        name:'filesTransfer'
      },
      /*返聘预入职*/
      {
        path: '/Reemployment',
        component: Reemployment,
        name:'Reemployment'
      },
      /*续聘定薪*/
      {
        path: '/salaryRenewal',
        component: salaryRenewal,
        name:'salaryRenewal'
      },

      /*企业年金增员*/
      {
        path: '/annuityIncrease',
        component: annuityIncrease,
        name:'annuityIncrease'
      },
      /*离职*/
      {
        path: '/quitJob',
        component: quitJob,
        name:'quitJob'
      },
        /*出国境申请*/
        {
            path: '/goAbroad',
            component: goAbroad,
            name:'goAbroad'
        },
      /*绩效考评实施*/
      {
        path: '/evaluateAssess',
        component: evaluateAssess,
        name:'evaluateAssess'
      },
      {
        path: '/selectScheme',
        component: selectScheme,
        name:'selectScheme'
      },
      {
        path: '/evaluateGrade',
        component: evaluateGrade,
        name:'evaluateGrade'
      },
	    {
		    path: '/evaluteHistory',
		    component: evaluteHistory,
		    name:'evaluteHistory'
	    },
	    /*胜任力考评实施*/
	    {
		    path: '/competencyAssess',
		    component: competencyAssess,
		    name:'competencyAssess'
	    },
	    {
		    path: '/competencyScheme',
		    component: competencyScheme,
		    name:'competencyScheme'
	    },
	    {
		    path: '/competencyGrade',
		    component: competencyGrade,
		    name:'competencyGrade'
	    },
	    {
		    path: '/competencyHistory',
		    component: competencyHistory,
		    name:'competencyHistory'
	    },

        {
          path: '/processList',
          component: processList,
          children:[
            {
              path: 'evectionFlow',
              component: evectionFlow,
            },
            {
              path: 'overtimeFlow',
              component: overtimeFlow,
            },
            {
              path: 'leaveFlow',
              component: leaveFlow,
            },
            {
              path: 'shiftFlow',
              component: shiftFlow,
            },
            {
              path: 'restFlow',
              component: restFlow,
            },
            {
              path: 'goOutFlow',
              component: goOutFlow,
            },
            {
              path: 'forgetClockFlow',
              component: forgetClockFlow,
            }
          ]
        },
    ]

}]

